//
//  AddPayBankCell.m
//  JiFengDaRen
//
//  Created by CYF on 2017/3/2.
//  Copyright © 2017年 SH_iOS. All rights reserved.
//

#import "AddPayBankCell.h"

@implementation AddPayBankCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self configUI];
        
    }
    return self;
}

-(void)configUI{
    
    self.icon = [[UIImageView alloc]init];
    [self.contentView addSubview:self.icon];
    self.nameLabel = [[UILabel alloc]init];
    self.nameLabel.text = @"";
    self.nameLabel.font = KSystemFont(__I6Width(15));
    self.nameLabel.textColor = [UIColor colorWithHexString:@"#333333"];
    [self.contentView addSubview:self.nameLabel];
    
    self.selectedImage = [[UIImageView alloc]init];
    self.selectedImage.image = [UIImage imageNamed:@"jmarrow@2x.png"];
    [self.contentView addSubview:self.selectedImage];
    
}
-(void)layoutSubviews{
    [self.icon mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(__I6Width(5));
        make.height.mas_equalTo(__I6Height(5));
        make.left.mas_equalTo(self.mas_left).with.offset(__I6Width(0));
        make.centerY.mas_equalTo(self.mas_centerY);
    }];
    
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(__I6Width(200));
        make.height.mas_equalTo(__I6Height(15));
        make.left.mas_equalTo(self.icon.mas_right).with.offset(__I6Width(15));
        make.centerY.mas_equalTo(self.mas_centerY);
    }];
    
  
    
    

    [self.selectedImage mas_makeConstraints:^(MASConstraintMaker *make) {

        make.height.mas_equalTo(__I6Height(28 * 0.5));
        make.width.mas_equalTo(__I6Width(15 * 0.5));
        make.right.mas_equalTo(self.contentView.mas_right).with.offset(__I6Width(-15));
        make.centerY.mas_equalTo(self.contentView.mas_centerY);
    }];
    UIView *line = [[UIView alloc]init];
    line.backgroundColor = KLINECOLOR;
    [self.contentView addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.mas_equalTo(self.contentView.mas_left).with.offset(__I6Width(0));
        make.right.mas_equalTo(self.contentView.mas_right).with.offset(__I6Width(0));
        make.height.mas_equalTo(__I6Height(0.5));
        make.bottom.mas_equalTo(self.contentView.mas_bottom).with.offset(__I6Height(0));
    }];
    
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
